# c++11 required
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
include_directories(.)
include_directories(../)
include_directories(../../)
add_definitions(-D__STDC_FORMAT_MACROS)
include_directories(/usr/local/include)
#link_directories(/home/zsy/webrtc-ns3/webrtc/base/libevent/lib)
FIND_LIBRARY(COMM_LIB event "/usr/local/lib" NO_DEFAULT_PATH)
#link_libraries(${COMM_LIB})
#find_package(libevent REQUIRED)
set(rtc_base_FILES
#experiments/alr_experiment.cc
#experiments/congestion_controller_experiment.cc
#experiments/quality_scaling_experiment.cc
#synchronization/rw_lock_posix.cc
#synchronization/rw_lock_wrapper.cc
checks.cc
race_checker.cc
criticalsection.cc
event.cc
platform_thread.cc
#platform_thread_types.cc
rate_limiter.cc
logging.cc
logsinks.cc
timeutils.cc
platform_file.cc
stringutils.cc
stringencode.cc
#strings/string_builder.cc
#strings/audio_format_to_string.cc
thread_checker_impl.cc
base64.cc
bitbuffer.cc
bitrateallocationstrategy.cc
bufferqueue.cc
bytebuffer.cc
copyonwritebuffer.cc
event_tracer.cc
file.cc
flags.cc
location.cc
#numerics/histogram_percentile_counter.cc
pathutils.cc
platform_file.cc
race_checker.cc
random.cc
rate_statistics.cc
ratetracker.cc
string_to_number.cc
timestampaligner.cc
#zero_memory.cc
file_posix.cc
task_queue_posix.cc
task_queue_libevent.cc
sequenced_task_checker_impl.cc
weak_ptr.cc
numerics/exp_filter.cc
asyncinvoker.cc
asyncpacketsocket.cc
asyncresolverinterface.cc
asyncsocket.cc
asynctcpsocket.cc
asyncudpsocket.cc
crc32.cc
cryptstring.cc
#data_rate_limiter.cc
filerotatingstream.cc
fileutils.cc
#helpers.cc
#httpcommon.cc
ipaddress.cc
#messagedigest.cc
messagehandler.cc
messagequeue.cc
nethelper.cc
nethelpers.cc
network.cc
networkmonitor.cc
nullsocketserver.cc
#openssladapter.cc
#opensslcommon.cc
#openssldigest.cc
#opensslidentity.cc
#opensslsessioncache.cc
#opensslstreamadapter.cc
physicalsocketserver.cc
proxyinfo.cc
#rtccertificate.cc
#rtccertificategenerator.cc
signalthread.cc
sigslot.cc
#socket.cc
#socketadapters.cc
socketaddress.cc
socketaddresspair.cc
socketstream.cc
#ssladapter.cc
#sslfingerprint.cc
#sslidentity.cc
#sslstreamadapter.cc
stream.cc
thread.cc
ifaddrs_converter.cc
unixfilesystem.cc
${PROJECT_SOURCE_DIR}/system_wrappers/source/field_trial_default.cc#really ugly
${PROJECT_SOURCE_DIR}/common_types.cc
)
add_library(rtc_base SHARED ${rtc_base_FILES})
target_link_libraries(rtc_base  pthread rt ${COMM_LIB}) #system_wrappers

